home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 5
/
Gold Medal Software - Volume 5 (Gold Medal) (1995).iso
/
database
/
dates409.arj
/
DATES.DOC
< prev
next >
Wrap
Text File
|
1994-09-04
|
11KB
|
261 lines
DATES.DOC
09/04/94
This program keeps track of birthdays, anniversaries, coming events, etc giving
you advance warning so you can send out cards, leave town, etc. Features of
this program:
* Initially defaults to showing all events happening within 14 days
* You can set up multiple date files, each with their own day threshold;
for example, one file for birthdays, another for business meetings, etc
* This program can be included in your AUTOEXEC.BAT file to provide notices
every time you turn on your PC.
* Vague dates can be entered (e.g. "11/XX/XX Thanksgiving) when the exact
day varies from year to year
* Dates can be in the United States format (/DATE=mm/dd/yy) or in most other
formats (e.g. /DATE=dd-mm-yy)
* Months can be entered as sequential months (1 for January, 2 for February,
etc) or else entered as the months themselves (JAN, FEB, etc)
* Dates don't have to be padded (9/6/94, 09/06/94, and SEP/06/1994 are all
accepted)
* The program will show you the weekday and age of the event if desired
* Comment lines can be displayed if desired (e.g. "Events relating to work:")
The dates file is a simple ASCII text file, created and maintained with any text
editor. Each record should begin with a date (typically in mm/dd/yy format)
followed by a description of the event. For example:
05/05/93 Lucy Baines
Blank lines or any line which begins with a colon (":") or semi-colon (";") are
ignored by the program. Lines which begin with an asterisk ("*") are printed
verbatim (minus the asterisk); add spacing after the asterisk if you want the
lines to be indented upon display.
For the date portion of the record, you have some flexibility. Initially by
default, the program expects dates to be in a mm/dd/yy format. So August 5,
1993 is "08/05/93".
You can change the sequence of the numbers by using the "/DATE=format" option.
For example, you can specify "/DATE=dd-mm-yy" if you want.
Typically, most date formats will use one of the delimiters "-", ".", or "/"
between all various day, month, and year fields. For example, /DATE=dd.mm.yy
instead of /DATE=dd.mm/dd. If this is done, your input fields can entered in a
very flexible manner. The routine will parse the date field based on the
delimiters and accept fields with or without padding, years with or without the
century, and alphabetic months instead of just numeric ones. For example, using
/DATE=dd.mm.yy, all of the following September 5, 1994 events as the same:
05.09.94 Big event
5.9.94 Same event
5.sep.1994 Still the same thing
05.september.1994 And yet again the same event
The month portion of the date *has* to be filled in. The day and year portions
can be "xx" if desired. If a day is "xx", you will be given the notice for the
entire month and for 15 days before the start of the month. For dates which
vary from year to year (e.g. Thanksgiving), you can either use the "xx" option
for the day or revise the file every year.
Records in the file don't have to be in any particular order. The dates will be
presented in the order they appear in the file so putting them in chronological
order makes the most sense.
A sample DATES.TXT file is provided and consists of the following lines:
01/01/xx New Year's Day
01/20/xx -ish Martin Luther King's birthday
02/14/xx Valentine's Day
03/17/xx St. Patrick's Day
03/30/xx -ish Easter
04/07/xx -ish Daylight Savings Time begins
05/10/xx -ish Mother's Day
05/30/xx -ish Memorial Day
05/31/57 Bruce Guthrie
07/04/xx July 4th
09/02/xx -ish Labor Day
10/27/xx -ish Daylight Savings Time ends
10/31/xx Halloween
11/xx/xx Thanksgiving
11/11/xx Veteran's Day
11/20/xx -ish Thanksgiving
12/25/xx Christmas
Multiple input files with different date restrictions:
You can specify multiple date input files. They are processed in the order
they are entered. By default, each will have the initial date restriction
(typically 14 days). You can override the date restriction for a specific file
by including the date restriction after the file name. For example:
DATES DATE1.TXT DATE2.TXT /D10 DATE3.TXT
Given a default 14-day restriction, the date restrictions will be 14 days for
DATE1.TXT and DATE3.TXT, 10 days for DATE2.TXT. If you want to override the
date restriction for all files, include that date restriction before the file
name. For example:
DATES /D5 DATE1.TXT DATE2.TXT /D10 DATE3.TXT
In this case, the date restriction will be 5 days for DATE1.TXT and DATE3.TXT
and 10 days for DATE2.TXT.
The DATES.INI file:
DATES will read a DATES.INI file if one is found. (You can specify a different
file name if desired.) The file is an ASCII text file that can be created
maintained by hand. The file can consist or one or more command line
parameters (only those that begin with a "/"), one statement per line.
The file can also contain comments which are blank lines or any line beginning
with:
; (semi-colon)
: (colon)
' (quote)
DATES looks for the initialization file in your default subdirectory first. It
then searches for it in the subdirectory where the executable was and then goes
through your DOS path.
Passing in "/INULL" skips loading the DATES.INI file.
Syntax:
DATES [ date_file [...] ] [ /Ddays ] [ /-AGE | /AGE ] [ /COLOR=nnn nnn nnn ]
[ /CLS | /-CLS ] [ /Q | /-Q ] [ /Iinitfile | /-I ] [ /R ]
[ /DAY | /-DAY ] [ /MONO | /COLOR ] [ /SKIP | /-SKIP ]
[ /DATE=format ] [ /? ] [ > filename ]
where:
"date_file" is the name of the input text file. It can contain drive and path
information if desired. This defaults to DATES.TXT. If no filename is
specified, the program will check for it along your DOS path beginning with your
default subdirectory. Multiple date files and date restrictions are allowed.
See the notes above about this.
"/Ddays" (or "days") are the number of days in advance you want the warning.
Initially defaults to /D14. Note that generic days ("11/xx/xx") are not
affected by this setting; you automatically get the notice 14 (or whatever) days
before the beginning of the month.
"/AGE" shows the age of the event when it's printed. This is only done for
entries that have a specific year. This is the default.
"/-AGE" skips showing the age of the event. The default is /AGE.
"/COLOR=nnn nnn nnn" specifies the color settings to use for (in order) regular
text, dates happening today, and the ages of dates happening today. Any input
lines which begin with an asterisk are printed using the third color set. Each
setting must consist of three digits, the first two being the foreground color
and the last being the background color. The foreground color should be padded
on the left with a 0 if it is only one digit in length. Defaults to "COLOR=070
150 090".
Foreground colors:
Low intensity High intensity
0 = black 8 = dark grey
1 = blue 9 = light blue
2 = green 10 = light green
3 = cyan 11 = light cyan
4 = red 12 = light red
5 = magenta 13 = light magenta
6 = brown 14 = light yellow
7 = white 15 = bright white
Adding 16 to any color will make the text blink. Background colors can consist
of 0 to 7 above. Bright white on blue, for example, would be "151".
"/CLS" clears the display before showing the results.
"/-CLS" does not clear the display first. This is the default.
"/Q" stops the printing every message except for the actual date lines. This
option is automatically invoked if redirection is used.
"/-Q" turns back on the printing of almost every message. This is the default
unless redirection is used.
"/Iinitfile" specifies the name of the initialization file to try to load.
Defaults to "/IDATES.INI".
"/-I" says to skip reading the initialization file even if present.
"/R" sets a DOS return code equal to the number of dates found.
"/DAY" shows the day of the week if possible.
"/-DAYS" skips showing the day of the week. This is initially the default.
"/MONO" suppresses all screen color settings.
"/COLOR" allows screen color settings and is initially the default.
"/SKIP" says to print a message (unless /Q is specified) but otherwise ignore
it if one or more of the date input files is not found.
"/-SKIP" says to abort if any of the input files are not found.
"/DATE=format" specifies the format that the date is to have. The date must
consist of pairs of "mm" (month), "dd" (day), and "yy" (year) characters in any
order. If a delimiter is used between the pairs, it can be any non-space
character (like "-" or "/"). If your delimiter is the same between the three
sets of date portions (e.g. /DATE=mm/dd/yy or /DATE=dd.mm.yy), you have a
considerable amount of flexibility in terms of what sort of entries can appear.
See the notes at the beginning of this documentation. Initially defaults to
"/DATE=mm/dd/yy".
"/?" or "/HELP" or "HELP" shows you the syntax for the command.
"> filename" redirects the output to a DOS file. This is standard DOS
redirection. Automatically invokes /Q option and turns off the last of the
status messages.
Return codes:
DATES returns the following ERRORLEVEL codes:
255 = syntax problems, or /? requested
If /R is specified, the ERRORLEVEL code will be the number of hits found.
Author:
This program was written by Bruce Guthrie of Wayne Software. It is free for use
and redistribution provided relevant documentation is kept with the program, no
changes are made to the program or documentation, and it is not bundled with
commercial programs or charged for separately. People who need to bundle it in
for-sale packages must pay a $50 registration fee to "Wayne Software" at the
following address.
Additional information about this and other Wayne Software programs can be found
in the file BRUCEymm.DOC which should be included in the original ZIP file.
("ymm" is replaced by the last digit of the year and the two digit month of the
release. BRUCE312.DOC came out in December 1993. This same naming convention
is used in naming the ZIP file that this program was included in.) Comments and
suggestions can also be sent to:
Bruce Guthrie
Wayne Software
113 Sheffield St.
Silver Spring, MD 20910
fax: (301) 588-8986
See BRUCEymm.DOC file for additional contact information.
Foreign users: Please provide an Internet e-mail address in all correspondence.